<?php /*a:5:{s:75:"D:\English\XAMPP-PHP5\htdocs\tp5\application\index\view\index\projects.html";i:1588769906;s:67:"D:\English\XAMPP-PHP5\htdocs\tp5\application\index\view\layout.html";i:1590217625;s:74:"D:\English\XAMPP-PHP5\htdocs\tp5\application\index\view\public\header.html";i:1589556016;s:73:"D:\English\XAMPP-PHP5\htdocs\tp5\application\index\view\public\float.html";i:1587203341;s:74:"D:\English\XAMPP-PHP5\htdocs\tp5\application\index\view\public\footer.html";i:1588948031;}*/ ?>
<div>
    <div class="my_container">
        <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/homePage.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/tooltip.css" />
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-ui@2.12.0/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/element-ui@2.12.0/lib/index.js"></script>
    <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/qs/6.5.1/qs.min.js"></script>


</head>

<body>
    <div class="top">
        <div class="name">
            <a style="text-decoration: none;" href="<?php echo url('index/getHomePage'); ?>">
                <img src="http://localhost/tp5/public/img/header/logo.png" style="width:8em">
                <!--火花设计思维分享-->
            </a>
        </div>
        <?php if(!isset($_COOKIE['user'])): ?>
        <div class="login" style="margin-left: 50%;"><a href="<?php echo url('index/login'); ?>" style="font-size: 20px;">登录</a></div>
        <div class="register"><a href="<?php echo url('index/register'); ?>" style="font-size: 20px;">注册</a></div>

        <?php else: ?>

        <!--添加成员的消息通知-->
        <div onclick="window.location.href='<?php echo url('index/showPrjMemRequests'); ?>'" class="request_banner" style="display: none;"></div>


        <div class="login"><a id="header_projects" href="<?php echo url('index/getProjects',array('userId'=>$_COOKIE['user'])); ?>" style="font-size: 20px;">项目小组</a></div>


        <div class="register"><a id="header_methods" href="<?php echo url('index/getDesignMethods'); ?>" style="font-size: 20px;">设计方法</a></div>
        <div class="register"><a id="header_cases" href="<?php echo url('index/getPublicCanvasLists'); ?>" style="font-size: 20px;">创意社区</a></div>
        <div class="register"><a id="header_ques" href="<?php echo url('index/getSingleQuesBank'); ?>" style="font-size: 20px;">题库练习</a></div>


        <div class="welcome_banner" style="z-index:105;" onmouseover="$('#logout').show()" onmouseout="$('#logout').hide()">
            <svg style="margin-left:65px;" t="1573030732563" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2246" width="40" height="40">
                <path d="M512 950.857143c241.371429 0 438.857143-197.485714 438.857143-438.857143s-197.485714-438.857143-438.857143-438.857143-438.857143 197.485714-438.857143 438.857143 197.485714 438.857143 438.857143 438.857143z m0 73.142857c-285.257143 0-512-226.742857-512-512s226.742857-512 512-512 512 226.742857 512 512-226.742857 512-512 512z" fill="#e45440" p-id="2247">

                </path>
                <text x="50%" y="65%" style="fill:#e45440;font-size:550px;text-anchor: middle;">
                    <?php echo iconv_substr($_COOKIE['username'],0,1); ?>
                </text>
            </svg>


            <div id="logout">
                <div class="logout_top">
                    <text class="logout_user"><?php echo htmlentities($_COOKIE['username']); ?></text>
                    <br>
                    <text class="logout_id">ID: <?php echo htmlentities($_COOKIE['user']); ?></text>
                </div>

                <div class="logout_option">
                    <a href="<?php echo url('index/showPrjMemRequests'); ?>">我的消息</a>
                </div>

                <div class="logout_option">
                    <a href="<?php echo url('index/logout'); ?>">登出</a>
                </div>

                <div style="height: 6px;width: 100%;border-radius: 4px;"></div>
            </div>

            <svg style="float: right;margin-right: 30px;" t="1573118997341" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2175" width="15" height="40"><path d="M972.838375 233.161725c15.319322 15.477939 27.804007 28.100774 43.005646 43.46103-167.688762 171.229501-334.75329 341.814301-503.593304 514.220637C343.610253 619.265957 176.069875 448.809074 8.155979 277.978674c15.140239-13.528486 28.904092-25.828971 36.456303-32.582981C102.486983 299.970139 164.429441 355.920971 223.562844 414.706441c90.002299 89.475281 178.423545 180.552081 266.599191 271.833548 16.09194 16.659891 25.511737 17.96976 42.483746 0.450267 139.874522-144.366961 280.757028-287.756638 421.235317-431.540299C960.33834 248.844331 965.900165 241.36887 972.838375 233.161725z" p-id="2176"></path></svg>

        </div>
        <?php endif; ?>
    </div>
    <!--
<?php if(!isset($_COOKIE['user'])): ?>
<a href="<?php echo url('index/login'); ?>">登录</a>
<?php else: ?><a href="<?php echo url('index/logout'); ?>">登出</a>
<a href="<?php echo url('index/getProjects',array('userId'=>$_COOKIE['user'])); ?>">项目</a>
<?php endif; ?>-->

    <script>
        $.ajax({
            type: "GET",
            url: "http://localhost/tp5/public/index.php/index/index/getPrjMemRequests",
            data: {},
            xhrFields: {
                withCredentials: true
            },
            //crossDomain: true,
            success: function(result) {
                if (result != null && (result.request_list.length > 0 || result.reject_list.length > 0)) {
                    $(".request_banner").show();
                    $(".request_banner").html("<a style='cursor: pointer;'>-您有" + (result.request_list.length + result.reject_list.length) + "条消息-</a>");
                }
            }
        });

        /*$.get('http://localhost/tp5/public/index.php/index/index/getPrjMemRequests',{},function (result) {
            if(result != null && ( result.request_list.length > 0 || result.reject_list.length > 0) ) {
                $(".request_banner").show();
                $(".request_banner").html("<a>-您有" + ( result.request_list.length + result.reject_list.length ) + "条消息-</a>");
            }
            //$(".request_banner").load(location.href + " .request_banner");
        });*/
    </script>
</body>

</html> <!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Projects</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/projects.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/bootcssButtons.css" />

    <style>
        .add_prj {
            /*border: 1px solid;*/
            width: 100px;
            height: 100px;
            color: #ccc;
            transition: color .25s;
            position: relative;
        }

        .add_prj::before{
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            width: 80px;
            margin-left: -40px;
            margin-top: -5px;
            border-top: 5px solid;
        }
        .add_prj::after {
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            height: 80px;
            margin-left: -5px;
            margin-top: -40px;
            border-left: 5px solid;
        }

    </style>

    <script>
        function addProjectJS(userId){
            //var prj_name = prompt("请输入项目名称","");

            var prj_name = $('#new_prj_name').val();
            var re = new RegExp("^[ ]+$");

            if(prj_name.length > 10){
                $('#invalid_length').show();
                return ;
            }

            if(! re.test(prj_name) && prj_name != "" && prj_name != null ) {
                $('#invalid_name').hide();

                $.post("http://localhost/tp5/public/index.php/index/index/addProject", {name: prj_name, userId: userId}, function (data) {
                    //alert(data);
                    location.href='<?php echo url('index/getProjects',array('userId'=>$_COOKIE['user'])); ?>';
                    //window.location.reload();

                });
            }else {
                //alert("项目名称不能为空或空格！")
                $('#invalid_name').show();
            }
        }

        function showWindow() {
            $('#showdiv').show();  //显示弹窗
            $('#cover').css('display','block'); //显示遮罩层
            $('#cover').css('height','100%'); //设置遮罩层的高度为当前页面高度
        }

        // 关闭弹窗
        function closeWindow() {
            $('#showdiv').hide();  //隐藏弹窗
            $('#cover').css('display','none');   //隐藏遮罩层
        }
    </script>
</head>
<body>



<?php if(isset($_COOKIE['user'])): ?>

    <!--<button onclick="showWindow()" class="prj_add">添加项目</button>-->
<br/><br/>


<div style="margin-top:20px;border-color:#D9D9D9;position:relative;width: 258px;height: 190px;float: left;margin-left: 50px;">
   <div class="button button-border"  onclick="showWindow()"  style="border-color:#D9D9D9;padding:0;float: left;width: 100%;height: 100%;">
        <div style="position:absolute;top:1.5%;height:132px;width:98.5%;">
            <div style="position:absolute;top:10%;left: 30%;" class="add_prj"></div>
            <p style="margin-top: 45%;color: #666666;">新建小组</p>

        </div>
    </div>
</div>

    <!--该用户所在的项目展示-->
    <?php if(is_array($projects) || $projects instanceof \think\Collection || $projects instanceof \think\Paginator): $i = 0; $__LIST__ = $projects;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$prj): $mod = ($i % 2 );++$i;?>
    <div style="border-color:#D9D9D9;position:relative;width: 258px;height: 190px;float: left;margin-left: 50px;margin-top: 20px;">
    <!--class="button button-glow button-border button-rounded button-primary"-->
        <div class="button button-border" id="<?php echo htmlentities($prj['prj_id']); ?>" onclick="location.href='<?php echo url('index/getTools',array('prjId'=>$prj['prj_id'])); ?>'"
             style="color:#8f8f8f;border-color:#D9D9D9;padding:0;float: left;width: 100%;height: 100%;">
            <div style="background-image:url(http://localhost/tp5/public/img/prj_display_4.png);background-size:100% 100%;position:absolute;top:1.5%;height:132px;width:98.5%;">
                <p style="margin-top: 20%;color: #101010;"><?php echo htmlentities($prj['prj_name']); ?></p>
            </div>

            <div style="position: absolute;font-size: 10px;top: 83%;left: 4%;">小组成员：<?php echo htmlentities($prj['members_size']); ?>人</div>

            <div style="position: absolute;top: 83%;right:1%;font-size: 10px;">创建时间：<?php echo htmlentities($prj['date']); ?></div>
        </div>
    </div>
    <?php endforeach; endif; else: echo "" ;endif; ?>
    <!--结束-->



<!--以下为新增项目时的弹窗相关-->
<!-- 遮罩层 -->
<div id="cover" class="cover"></div>
<!-- 弹窗 -->
<div id="showdiv" class="showdiv" style="height: 250px;">
    <!-- 标题 -->
    <div class="showdiv_title" >
        创建小组
    </div>
    <!-- 内容 -->
    <div class="showdiv_prompt">
        请输入要创建的小组名称
        <input type="text" id="new_prj_name">

        <div  style="color: red;font-size: 13px;">（请不要超过10个字）</div>
        <div id="invalid_name" style="display: none;color: red;font-size: 13px;">小组名称不能为空或空格</div>
        <div id="invalid_length" style="display: none;color: red;font-size: 13px;">小组名称暂时不支持超过10个字符</div>
    </div>

    <!-- 按钮 -->
    <div class="button button-medium " onclick="closeWindow()" style="position:absolute;left: 25%;top: 80%;" >
        取消</div>
    <div id="next_step_btn" onclick="addProjectJS('<?php echo htmlentities($_COOKIE['user']); ?>')" class="button button-action button-medium " style="position:absolute;left: 50%;top: 80%;">
        确定</div>

</div>


<?php endif; ?>


<script>
    $('#header_projects').css('border-bottom','solid 2px #000000');
    $('#header_projects').css('font-weight','bold');


    if(location.href.split(/[/.]/).indexOf('checklogin') != -1 || location.href.split(/[/.]/).indexOf('afterregister') != -1){
        window.location.href='<?php echo url("index/getProjects",array('userId'=> $_COOKIE['user'])); ?>';
    }

</script>


</body>
</html> <head>
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/float_window.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/tools.css" />
    <link href="http://localhost/tp5/public/CSS/toastr.css" rel="stylesheet" />
    <script src="http://localhost/tp5/public/JS/toastr.js"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost/tp5/public/CSS/bootcssButtons.css" />


    <script>
        function sendFeedback(userId) {
            var feedbackInfo = $('#feedbackInfo').val();
            var re = new RegExp("^[ ]+$");

            if (!re.test(feedbackInfo) && feedbackInfo != "" && feedbackInfo != null) {

                $.post("http://localhost/tp5/public/index.php/index/index/addFeedback", {
                    feedbackInfo: $('#feedbackInfo').val(),
                    userId: userId
                }, function() {
                    //显示一个信息没有标题
                    toastr.success('反馈已成功发送，感谢使用~');
                    setTimeout(function() {
                        toastr.clear();
                    }, 2000);
                });
            } else {
                toastr.error('反馈不能为空~');
                setTimeout(function() {
                    toastr.clear();
                }, 2000);
            }
        }

        function showFeedback() {
            $('#showdiv_F').show(); //显示弹窗
            $('#cover_F').css('display', 'block'); //显示遮罩层
            $('#cover_F').css('height', '100%'); //设置遮罩层的高度为当前页面高度
        }

        // 关闭弹窗
        function closeFeedback() {
            $('#showdiv_F').hide(); //隐藏弹窗
            $('#cover_F').css('display', 'none'); //隐藏遮罩层
        }
    </script>
</head>

<body>

    <!--<div style="height:1000px;"></div>-->

    <div class="guide">
        <div class="guide-wrap">
            <!--<a href="#" class="edit" title="发新帖"><span>发新帖</span></a>
        <a href="#" class="find" title="找论坛"><span>找论坛</span></a>-->
            <?php if(isset($_COOKIE['user'])): ?>
            <a href="javascript:showFeedback()" class="report" title="反馈"><span>反馈</span></a> <?php endif; ?>
            <a href="javascript:window.scrollTo(0,0)" class="top" title="回顶部"><span>回顶部</span></a>
        </div>
    </div>



    <?php if(isset($_COOKIE['user'])): ?>

    <!--以下为添加反馈时的弹窗相关-->
    <!-- 遮罩层 -->
    <div id="cover_F" class="cover"></div>
    <!-- 弹窗 -->
    <div id="showdiv_F" class="showdiv" style="height: 250px;">
        <!-- 标题 -->
        <div class="showdiv_title">
            意见和反馈
        </div>
        <!-- 内容 -->
        <div class="showdiv_prompt">
            请留下您的宝贵意见或反馈：

            <div>
                <textarea required id="feedbackInfo" style="height: 100px;width: 400px;margin-top: 20px;"></textarea>
            </div>
        </div>

        <!-- 按钮 -->
        <div class="button button-medium " onclick="closeFeedback()" style="position: absolute;left: 25%;top: 80%;">
            取消</div>
        <div id="next_step_btn" onclick="sendFeedback('<?php echo htmlentities($_COOKIE['user']); ?>')" class="button button-action button-medium" style="position:absolute;left: 50%;top: 80%;">
            发送</div>

    </div>

    <?php endif; ?>

</body>

    </div>
    <div class="footer">
        <style>
    a {
        text-decoration: none;
        color: #aaabab;
        text-decoration: none;
    }
    
    a:hover {
        color: #647BFF;
        text-decoration: none;
    }
</style>

<div style="font-size:18px;background-color: #f9f9f9;color:#aaabab;width:100%;/*padding: 20px 0;*/text-align: center;">
    Copyright © <a href="http://localhost/tp5/public/index.php">火花设计思维分享</a> 京ICP备19028873号-1
</div>
    </div>
</div>



<script>
    // 此处应修改，不能直接操作innerHTML，不然echarts绘图空白
    // var s = document.body.innerHTML;
    // s = s.replace(/商业/g, '产业');
    // document.body.innerHTML = s;
</script>


<style>
    * {
        margin: 0;
        padding: 0;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    }
    
    .my_container {
        min-height: 600px;
        padding-bottom: -25px;
        min-width: 925px;
    }
    
    .my_container::after {
        content: "";
        clear: both;
        display: block;
    }
    
    .footer {
        height: 25px;
        min-width: 925px;
    }
    
    button {
        margin-left: 10px;
        border-radius: 20px;
        padding: 12px 23px;
        color: #fff;
        background-color: #409eff;
        border-color: #409eff;
        display: inline-block;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        border: 1px solid #dcdfe6;
        -webkit-appearance: none;
        text-align: center;
        box-sizing: border-box;
        outline: none;
        margin: 0;
        transition: .1s;
        font-weight: 500;
        font-size: 14px;
        font-family: inherit;
        -webkit-writing-mode: horizontal-tb;
        text-rendering: auto;
    }
    
    button:hover {
        background: #66b1ff;
        border-color: #66b1ff;
        color: #fff;
    }
</style>